package com.web.base.user.message;

import com.blue.core.dict.State;
import com.blue.validation.group.SaveModel;
import com.blue.validation.group.UpdateModel;
import com.web.core.dict.OfficeType;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;

/**
 * 部门请求内容
 * 
 * @author 代码由 blue-code 框架生成
 * @since 1.0 2017年04月16日
 */
 public class OfficeRequest implements Serializable
{
	private static final long serialVersionUID = 1L;
	
	@NotNull(groups = { UpdateModel.class }, message = "部门编号不能为空")
	@Null(groups={SaveModel.class}, message="部门编号必须为空")
	private Integer id;
	private Integer parentId;
	@Size(min = 0, max = 20, groups = { SaveModel.class, UpdateModel.class }, message = "代码长度[0-20]")
	private String code;
	@NotBlank(groups = { SaveModel.class }, message = "部门名称不能为空")
	@Size(min = 0, max = 50, groups = { SaveModel.class, UpdateModel.class }, message = "部门名称长度[0-50]")
	private String name;
	@Size(min = 0, max = 200, groups = { SaveModel.class, UpdateModel.class }, message = "部门图片长度[0-200]")
	private String pic;
	@Size(min = 0, max = 500, groups = { SaveModel.class, UpdateModel.class }, message = "部门描述长度[0-500]")
	private String descp;
	@NotNull(groups = { SaveModel.class }, message = "部门类型不能为空")
	private OfficeType type;
	@Size(min = 0, max = 200, groups = { SaveModel.class, UpdateModel.class }, message = "详细地址长度[0-200]")
	private String address;
	private Double longitude;
	private Double latitude;
	private State state;
	private Integer sort;
	private Date createDate;
	private Date endDate;
	
	public OfficeRequest()
	{
	}
	
	public Integer getId()
	{
		return this.id;
	}
	
	public void setId(Integer id)
	{
		this.id = id;
	}
	
	public Integer getParentId()
	{
		return this.parentId;
	}
	
	public void setParentId(Integer parentId)
	{
		this.parentId = parentId;
	}
	
	public String getCode()
	{
		return this.code;
	}
	
	public void setCode(String code)
	{
		this.code = code;
	}
	
	public String getName()
	{
		return this.name;
	}
	
	public void setName(String name)
	{
		this.name = name;
	}
	
	public String getPic()
	{
		return this.pic;
	}
	
	public void setPic(String pic)
	{
		this.pic = pic;
	}
	
	public String getDescp()
	{
		return this.descp;
	}
	
	public void setDescp(String descp)
	{
		this.descp = descp;
	}
	
	public OfficeType getType()
	{
		return this.type;
	}
	
	public void setType(OfficeType type)
	{
		this.type = type;
	}
	
	public String getAddress()
	{
		return this.address;
	}
	
	public void setAddress(String address)
	{
		this.address = address;
	}
	
	public Double getLongitude()
	{
		return this.longitude;
	}
	
	public void setLongitude(Double longitude)
	{
		this.longitude = longitude;
	}
	
	public Double getLatitude()
	{
		return this.latitude;
	}
	
	public void setLatitude(Double latitude)
	{
		this.latitude = latitude;
	}
	
	public State getState()
	{
		return this.state;
	}
	
	public void setState(State state)
	{
		this.state = state;
	}
	
	public Integer getSort()
	{
		return this.sort;
	}
	
	public void setSort(Integer sort)
	{
		this.sort = sort;
	}
	
	public Date getCreateDate()
	{
		return this.createDate;
	}
	
	public void setCreateDate(Date createDate)
	{
		this.createDate = createDate;
	}
	
	public Date getEndDate()
	{
		return this.endDate;
	}
	
	public void setEndDate(Date endDate)
	{
		this.endDate = endDate;
	}
	
}
